<?
if ($partners == 1) {
	echo "<div id=\"poll1\">\n";
	echo "<div style=\"margin-right: 4px; padding-bottom: 4px;\"><a href=\"partners.php\" title=\"soniXshop Partner Sites\">\n";
	echo "<img src=\"images/partner_header.gif\" title=\"soniXshop Partner Sites\" border=\"0\"></a></div>\n";
	
	$sqlPartner = "SELECT * from transPartnerSites WHERE Active = '1' ORDER BY RAND() LIMIT 6";
	$resultPartner = mysql_db_query($dbname,$sqlPartner);
	
	while ($valuePartner = mysql_fetch_assoc($resultPartner)) {
		$pSiteName = stripslashes($valuePartner[SiteName]);
		$pURL = $valuePartner[URL];
		$pLogo = $valuePartner[LogoFilename];
		$pDesc = stripslashes($valuePartner[PDesc]);
		if (!empty($pLogo)) { $pLink = "<img src=\"images/partners/".$pLogo."\" border=\"0\">"; }
		else { $pLink = "<b>".$pSiteName."</b><br>$pDesc"; }
		
		if (!empty($pURL)) {	
			$pSiteName .= ": $pDesc";			
			echo "<a href=\"$pURL\" target=\"_blank\" title=\"$pSiteName\">$pLink</a><br>\n";
		}	
	}
	echo "<div class=\"hr\"><hr /></div>\n";
	echo "<img src=\"images/bullet_red.gif\"><a href=\"partners.php\" title=\"soniXshop Partner Sites\">More Partners</a>\n";
	echo "</div>\n";
}	
?>